var adminMember = require("../../../class/admin/memberinfo.c");
module.exports = {
    prefix: "/admin/member/",
    get: {
        "getMemberInfoList": {
            des: {
                name: "getMemberInfoList",
                content: "获取会员列表",
                params: [{
                	key:'page',
                	type:'int'
                }]
            },
            method: function*() {
                var self = this;
                print("获取会员列表");
                try {
                	var data = yield new adminMember(self.session.admin).list(self.request.query);
                   	self.body = data;
                } catch (e) {
                    self.body = printError(e);
                };
            }
        }
    },
    post:{
    	'updateStatus':{
    		des:{
    			name:'updateStatus',
    			content: "修改用户申请会员状态",
    			params: [{
                	key:'_id',
                	type:'string'
                },
                {
                	key:'status',
                	type:'int',
                	describe:'0:审核未通过，2：审核通过，1，待审核'
                }]
    		},
            method: function*() {
                var self = this;
                try {
                	var data = yield new adminMember(self.session.admin).updateStatus(self.request.body);
                   	self.body = data;
                } catch (e) {
                    self.body = printError(e);
                };
            }
    	}
    }
}
